#{extends 'main.html' /}
#{set title:'Accueil' /}
<h2 align="center">Management de compte</h2>
		<div id="menu">
			<nav>
				<ul>
					<li><a href="#">Activit&eacute;</a></li>
					<li><a href="#">Projets</a></li>
					<li><a href="#">DDT</a></li>
					<li><a href="/admin">Administration</a></li>
				</ul>
			</nav>
		</div>
		<div id="contenu">
	    <div id="portlet">
    		<header>
    			<br/>
    			<h4>Situation des contrats</h4>
    		</header>
			<table>
				<thead>
					<tr>
						<th class="contrat">Contrat</th>
						<th class="budget">Budget</th>
						<th class="estime;">Estim&eacute;</th>
						<th class="consomme;">Consomm&eacute;</th>
						<th class="RAF">RAF</th>
						<th class="restebudget">Reste au budget</th>
						<th class="statut">Statut</th>
					</tr>
				</thead>
				<tbody>
				    #{list contrats, as:'contrat'}
				    <tr class="contrat" contactId="${contrat.codeContrat}" draggable="true">
			   			<td id="code-${contrat.codeContrat}"><a href="/admin/contrats/${contrat.codeContrat}">${contrat.codeContrat}</a></td>
			   			<td id="budget">${contrat.budget()}</td>
			   			<td id="estime">${contrat.estime()}</td>
			   			<td id="consomme">${contrat.consomme()}</td>
			   			<td id="RAF">${contrat.raf()}</td>
			   			<td id="restebudget">${contrat.resteBudget()}</td>
			   			<td id="statut-${contrat.statut}">${contrat.statut}</td>
			   		</tr>
				    #{/list}
				</tbody>
			</table>
	</div>
	    <div id="portlet">
    		<header>
    			<br/>
    			<h4>Consommation par projet</h4>
    		</header>
			<table>
				<thead>
					<tr>
						<th class="projet">Projet</th>
						<th class="estimeInitial">Estime&eacute; initial</th>
						<th class="consomme;">Consomm&eacute;</th>
						<th class="RAF">RAF</th>
						<th class="restebudget">Reste au budget</th>
					</tr>
				</thead>
				<tbody>
				    #{list projets, as:'projet'}
				    <tr class="projet" contactId="${projet.codeProjet}" >
			   			<td id="code-${projet.codeProjet}"><a href="/projets/edit?idProjet=${projet.idProjet}">${projet.libelleProjet}</a></td>
			   			<td id="estimeInitial">${projet.estimeInitial()}</td>
			   			<td id="consomme">${projet.consomme()}</td>
			   			<td id="RAF">${projet.raf()}</td>
			   			<td id="restebudget">${projet.resteBudget()}</td>
			   		</tr>
				    #{/list}
				</tbody>
			</table>
	</div>
	</div>

	